package com.cskaoyan.mapper.goodsMapper;

import com.cskaoyan.bean.goods.MarketGoods;
import com.cskaoyan.bean.goods.MarketGoodsExample;
import com.cskaoyan.bean.wxtopic.GoodsInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Hu
 * @create 2021-09-15 17:09
 * @Description
 */
public interface MarketGoodsMapper {
    long countByExample(MarketGoodsExample example);

    int deleteByExample(MarketGoodsExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketGoods record);

    int insertSelective(MarketGoods record);

    List<MarketGoods> selectByExample(MarketGoodsExample example);

    MarketGoods selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketGoods record, @Param("example") MarketGoodsExample example);

    int updateByExample(@Param("record") MarketGoods record, @Param("example") MarketGoodsExample example);

    int updateByPrimaryKeySelective(MarketGoods record);

    int updateByPrimaryKey(MarketGoods record);

    void deleteByPrimaryKeyInLogic(Integer goodsid);

    List<MarketGoods> getNewGoods(Integer limit);

    List<MarketGoods> getHotGoods(Integer limit);

    List<MarketGoods> getGoodsByCategoryId(@Param("id") Integer id, @Param("limit") Integer limit);

    List<GoodsInfo> getGoodsInfoBygoodId(Integer goodId);
}